<?php if(!$session->read('Auth.User'))
 { ?>
 <div class="login_section">
	<?php if(!cr("Users.noRegister")){?>
 	<?php echo $form->create('User', array('url'=>'/users/login/redirectBack:true','class'=>'loginForm','id'=>'loginBox'))?>
	<?php echo $form->input('email', array( 'value'=>__('Email'),'label'=>'','class'=>'username_box swap_value', 'error'=>false))?>
	<?php echo $form->input('password', array('value'=>__('**********'),'label'=>'','class'=>'swap_value pass_box', 'error'=>false))?>
	<?php echo $form->input('remember_me', array('type'=>'checkbox'))?>
	<?php echo $form->end(array('label'=>__('Login'),'class'=>'sign_btn_2'));?>
	<!--<?php echo $html->link(__('Register Now'), '/users/register',array('class'=>'reg_link')); ?><br /><?php echo $html->link(__('Forgot Password?'), '/users/forgotPassword',array('class'=>'forgot_link')); 
	}?>-->
	<div class="fbconnect">
	<?php
	//@FBCONNECT INTERACTION
	if(cr("FacebookConfig.appId")) 
	{
	?>-----OR----<BR><?php
		echo $html->link($html->image('/themed/modern/img/fconnect.png'),'javascript:void(0)',array("onclick"=>"doUserFbLogin();","escape"=>false,'class'=>'facebook_button'));
 	}?>
 	</div>
	</div>
<?php  } else { ?>
<?php $authedUser = $session->read('Auth.User');?>
<div class="login_content">
<div class="welcome"><?php echo __("Welcome");?>, <?php echo $authedUser['display_name'];?></div>
<ul class="styled_list">
<li><i class="fa fa-user"></i><?php echo $html->link(__('My Profile'), '/users/profile',array('class'=>''))."";?></li>
<li><i class="fa fa-envelope"></i><?php echo $html->link(__('My Inbox',true),'/messages/index/inbox',array('class'=>''))."";?></li>
<li><i class="fa fa-power-off"></i><?php echo $html->link(__('Logout'), '/users/logout',array('class'=>''));?></li>
</ul>
</div>


<?php } ?>
